//
//  WkWebViewController.swift
//  LivelyChat
//
//  Created by admin on 2021/7/27.
//

import UIKit
import WebKit
class WkWebViewController: BasicViewController {

    var webview = WKWebView()
    var str = ""
    var urlstr = ""
    
    override func viewDidLoad() {
        super.viewDidLoad()
        title = str
        //创建wkwebview
        let webview = WKWebView(frame: CGRect(x: 0, y: NavHeight, width: screenWidth, height: screenHeight - NavHeight))
        webview.backgroundColor = .clear
        //创建网址
        //创建请求
        if let url = URL(string: urlstr) {
            let request = URLRequest(url: url)
            //加载请求
            webview.load(request)
            //添加wkwebview
            self.view.addSubview(webview)
        }
    }

}
